<?php
/** 制定了一些通用的方法，子类只能修改指定的方法 */
abstract class Game
{
    final public function play()
    {
        $this->init();
        $this->start();
    }
    abstract public function init();
    abstract public function start();
}

class Football extends Game
{
    public function init()
    {
        echo "Football::init";
    }
    public function start()
    {
        echo "Football::start";
    }
}

$football = new Football;
$football->play();
